package com.boboPlanet.user.mq;

import com.boboPlanet.comm.rabbitmq.producer.IMqBuild;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Description: TODO 星球MQ topic定义
 * @Author: mis_wu
 * @Date: 2023/6/21
 **/
@AllArgsConstructor
@Getter
public enum PlanetMiddleMqEnum implements IMqBuild {

    /**
     * es 保存文章信息时同步 es mq
     */
    ES_INSERT_ARTICLE("esInsertQueue","esInsertExchange","","es-insert-article",true),

    /**
     * 用户登录 MQ
     */
    USER_LOGIN_MQ("user-login-mq-queue","user-login-mq-exchange","","user-login-mq",true),

    /**
     * 网关校验用户状态，XXL定时检测用户状态 MQ
     */
    CHANGE_USER_STATE_MQ("xxl-send-heartbeat-to-user-middle","xxl-send-user-state-top-exchange","","xxl-send-user-state-routingKey",true),

    /**
     * 测试MQ
     */
    TEST_MQ("test.mq.queue","test.exchange","","test.routingKey",null),

    ;



    private final String queue;

    private final String exchange;

    private final String exchangeType;

    private final String routingKey;

    /**
     * 发送MQ时是否需要授权,默认true
     */
    private final Boolean isAuth;

    @Override
    public String queue() {
        return this.queue;
    }

    @Override
    public String exchange() {
        return this.exchange;
    }

    @Override
    public String exchangeType() {
        return this.exchangeType;
    }

    @Override
    public String routingKey() {
        return this.routingKey;
    }

    @Override
    public Boolean isAuth() {
        return this.isAuth;
    }
}
